//Figure A.1 and Table A.1
clear all
set more off

qui use GU82_18_A_j_all, replace
qui tsset idj year, yearly

keep if j_ft==int(j_ft)
keep if j_union==int(j_union)
keep if j_ownership==int(j_ownership)
drop if missing(logdiffj_ahr) | missing(logdiffj_cqtotben) | missing(logdiffj_comp)

//%of total compensation
foreach a of varlist j_* {
qui gen ofc`a' = `a'/j_comp*100
}

drop if aj_CQBENC13<0
drop if aj_nonqf<0
drop if aj_disc<0

summarize j_* ofc* 
qui gen size = size_big+2*size_mid+3*size_small
qui gen rg = rg_ne+3*rg_mw+2*rg_s+4*rg_w

tabstat aj_* ofc*, statistics(mean)
tabstat aj_* ofc*, statistics(sd) 
tabstat aj_* ofc*, statistics(mean) by (year)
